﻿<%@ Page Language="C#" MasterPageFile="~/U_masterP.master" AutoEventWireup="true" CodeFile="uploadViDeo.aspx.cs" Inherits="uploadViDeo" %>
<%@ Register Src="uc_main/sideBar_right.ascx" TagName="sideBar_right" TagPrefix="uc1" %>

<%@ Register src="uc_main/menu_canhan.ascx" tagname="menu_canhan" tagprefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>Đăng video</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="content_top">
        <%--<asp:CheckBox ID="CheckBox1" runat="server"/>--%>
        <div id="kep">
        <a href="#">Trang cá nhân</a></div>
    <div id="tags">
        <p class="title_p">Đăng video vào công việc</p>
    </div>
        <%--<a href="#">
                    <img alt="X" src="img/dky.png" /></a>--%>
    </div>
    <div class="clear">
    </div>
    <div id="sub_content">
        <div id="content_left">
            <!-- noi dung chinh -->
            <uc2:menu_canhan ID="menu_canhan1" runat="server" />
            
            <div id="main_canhan" runat="server">
               
               <%--<iframe id="Frametest" src="testVideo.aspx" width="99%" style="margin:1px auto" height="400px">
               </iframe>--%>
               <div id="upVideo" style="margin:10px 0px 10px 10px">
                    <%--<div id="dropGig">
                   <asp:DropDownList ID="dropGig" runat="server" AppendDataBoundItems="True">
                       <asp:ListItem Value="-1">------------------------- Chọn 1 công việc -------------------------</asp:ListItem>
                   </asp:DropDownList>
                   </div>--%>
                   <div id="uploadD">
                       <asp:FileUpload ID="FileUpload1" runat="server" />
                       <asp:RegularExpressionValidator 
                     id="RegularExpressionValidator1" runat="server" 
                     ErrorMessage="Chỉ chấp nhận file .mp4 " 
                     ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.mp4)$" 
                    ControlToValidate="FileUpload1"></asp:RegularExpressionValidator>
                    <br />
                       <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="11px" 
                           ForeColor="Red"></asp:Label>
                           <br />
                       
                           <p class="chuthich">(*) Đăng file .mp4 để chất lượng hình ảnh tốt nhất.</p>
                           <p class="chuthich">(*) Kích thước file không vượt quá 20MB.</p>
                           <p class="chuthich">(*) Hãy lựa chọn video thật kỹ trước khi upload.</p>
                    <br />
                       
                    </div>
                    <div id="button">
                        <asp:Button ID="Button1" runat="server" Text="Đăng Video" CssClass="button_V" onclick="Button1_Click" />
                        
                      </div>                         
               </div>
            </div>
            <!-- ket  thuc noi dung -->
        </div>
        <div id="content_right">
           
            <uc1:sidebar_right id="sideBar_right1" runat="server" />
           
        </div>
    </div>


<script type="text/javascript">
    function uploadError(sender,args)
        {
          document.getElementById('lblStatus').innerText = args.get_fileName(), "<span style='color:red;'>" + args.get_errorMessage() + "</span>";
        }
        
        function StartUpload(sender,args)
        {
            document.getElementById('lblStatus').innerText = 'Uploading Started.';
        }
        
        function UploadComplete(sender,args)
        {
            var filename = args.get_fileName();
            var contentType = args.get_contentType();
            var text = "Size of "  + filename + " is " + args.get_length() + " bytes";
            if (contentType.length > 0)
            {
                text += " and content type is '" + contentType + "'.";
            }
            document.getElementById('lblStatus').innerText = text;
        }

</script>
</asp:Content>


